package com.example.demo.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;


@Mapper
public interface DistanceMapper {
    @Select("SELECT Distance FROM distance WHERE start_poi_id = #{start_poi_id} AND end_poi_id = #{end_poi_id}")
    double getDistance(@Param("start_poi_id") int start_poi_id,@Param("end_poi_id") int end_poi_id);

    @Select("SELECT Duration FROM distance WHERE start_poi_id = #{start_poi_id} AND end_poi_id = #{end_poi_id}")
    double getDuration(@Param("start_poi_id") int start_id, @Param("end_poi_id") int end_id);

}
